//
//  NSString+CLY.h
//  Xingbei
//
//  Created by SRH on 15/10/26.
//  Copyright © 2015年 reformer. All rights reserved.
//

#import <Foundation/Foundation.h>
#define UserPhoneID @"userPhoneId"

@interface NSString (CLY)

- (CGFloat)cly_stringHeightWithFont:(UIFont *)font width:(CGFloat)width;

- (CGSize)cly_stringSizeWithFont:(UIFont *)font;

- (NSString *)cly_MD5String;

- (CGSize)sizeWithFont:(UIFont *)font maxW:(CGFloat)maxW;
- (CGSize)sizeWithFont:(UIFont *)font;
/*手机号码验证 MODIFIED BY HELENSONG*/
-(BOOL) isValidateMobile;

//写PList
+ (BOOL)writePlistWithFileName:(NSString *)fileName inDocument:(NSString *)direct withData:(id)data;

///读plist
+ (id)readPListWithFileName:(NSString *)fileName;

//获取当前时间
+(NSString *)getNowTime;

+(NSString*)readUsrPhoneID;
//判断车牌是否规范
+(BOOL)validateCarNo:(NSString* )carNo;
//读取昵称
+(NSString *)readnickName;

+(void)savenickName:(NSString *)nickName;
// 读取号码
+(NSString *)readPhone;
//手机号是否合格
-(BOOL)telephoneisValidateMobile;
//保存手机号
+(void)savePhoneNumber:(NSString*)number;
//保存用户id
+(void)saveUserId:(NSString *)userId;
//读取用户id
+(NSString*)readUserId;
//移除个人信息
+(void)removeInfo;
//身份证号是否合格
- (BOOL)validateIdentityCard;
//保存当前城市
+(void)saveLocoalCity:(NSString *)city;
//读取当前城市
+(NSString*)readLocoalCity;

//保存注册状态
+(void)saveRegister:(NSInteger)number;
//读取注册状态
+(NSInteger)readRegisetrStatus;

+(BOOL) isBlankString:(NSString *)string;
//读取mac地址
+(NSString *)readMacAdress;
//保存厂商名字
+(void)saveManufacturer:(NSString *)name;
//读取厂商名字
+(NSString *)readManufacturerName;
//精确到天
+(NSString *)getNowTimeexactDay;
//创建动态启动页的地址
+(NSString*)createDylogoImage;
//根据userid创建地址
+(NSString *)createPlistAddress:(NSString *)adressName;
//图片缓存地址
+(NSString *)createImagePath;

//恢复模式
+ (void)resumeDefaultState;
//mac 地址的处理
+ (NSString *)loadBackDealWith:(NSString *)preStr;
//精确到分钟
+(NSString *)getNowTimeexactMinutes;

- (float) heightForString:(NSString *)value andWidth:(float)width;

+ (void)connectionSuccessful;

+ (NSString*)loadImageUrl;

+(NSString *)getNowTimeMinus;
//
- (BOOL)pwdIsValidate;
//移除用户id
+(void)removeUserId;

+ (NSString *)readSessionId;
//
+ (void)saveMessageValue:(NSString *)value Key:(NSString *)key;
//清除登录手机号和密码
+ (void)deleUserPhoneAndPassWord;
//
+ (void)saveSessionId:(NSString *)sessionId;
//保存手机号和密码
+(void)savePhone:(NSString *)phone PassWord:(NSString *)passWord;
//
+ (BOOL)isEmpty:(NSString *)aStr;
//读取gps的用户名
+ (NSString *)readGpsImeid;
//用户
+(NSString *)loadUserLoginPhone;
//
+(NSString *)loadUserLoginPassWord;
//gps
+ (NSMutableAttributedString *)dealWithSt:(NSString *)name1  Name2:(NSString *)name2 ;
//
+ (NSString *)getbackWeatherImaName:(NSString *)message;
//时间转成周几
+ (NSString *)featureWeekdayWithDate:(NSString *)featureDate;
//
+ (NSInteger)calcDaysFromBegin:(NSDate *)beginDate end:(NSDate *)endDate;
//
-(NSString *)dealWithResultCode;
//是否是潘工写的底层
+(BOOL)versionIsGreaterThanFour;
//
+ (NSData *)convertHexStrToData:(NSString *)str;
//
+ (NSString *)loadEncryptingStr:(Byte[])testByte;
//
+ (NSString *)loadBackLastspeedStr:(NSString *)speedStr EleStr:(NSString *)eleStr LastStr:(NSString *)lastStr;

@end
